<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var num = Number(prompt("今天是一月几号？"))
      if (num == NaN) {
        alert("请正确输入日期！")
      } else if (num % 7 == 0) {
        alert("今天是星期二。")
      } else if (num % 7 == 1) {
        alert("今天是星期三！")
      } else if (num % 7 == 2) {
        alert("今天是星期四！")
      } else if (num % 7 == 3) {
        alert("今天是星期五！")
      } else if (num % 7 == 4) {
        alert("今天是星期六！")
      } else if (num % 7 == 5) {
        alert("今天是星期天！")
      } else if (num % 7 == 6) {
        alert("今天是星期一。。。")
      } else {
        alert("请正确输入日期！")
      }
    </script>
  </body>
</html>
